<style>
/* GLOBAL */
.middle-office-container {
	padding: 20px 50px;
	min-height: 600px;
}
.middle-office-wrapper {
    border-left: 1px solid #C6C6C6;
    border-right: 1px solid #C6C6C6;
    padding: 15px 30px;
}
hr.line {
    border-bottom: 1px solid #FFFFFF;
    border-top: 1px solid #C6C6C6;
    margin: 0 16px;
}
/* Table */
.table thead th, .table td {
	text-align: center;
    vertical-align: middle;
}
.table tbody tr.gray > td,
.table thead tr > th {
    background-color: #cdcdcd;
    height: 40px;
}
.table tr.expand {
	display: none;
	background-color: #cdcdcd;
}
.table tr.expand td {
	padding: 16px 16px 0;
}
/* Local */
</style>

<div class="middle-office-container">
  <h3>Danh sách các danh mục cho sản phẩm của gian hàng</h3>
  <hr class="line" />  
  
  <div class="middle-office-wrapper">
    <a class="btn btn-primary" href="<?php echo base_url("booth_product_categories/add/{$boothId}"); ?>">Thêm mới</a>  
   	
   	<?php if ($boothProductCategories): ?>
      <div class="pagination pagination-small pagination-centered">
        <ul><?php echo $this->pagination->create_links(); ?></ul>
  	  </div>
      <table class="table table-bordered table-condensed">
        <thead>
          <tr>
            <th id="number" width="110">Id</th>
            <th id="name" width="320">Tên danh mục</th>
            <th id="parent" width="210">Danh mục cha</th>
            <th id="edit"></th>
          </tr>
        </thead>
        <tbody>
        <?php foreach ($boothProductCategories as $boothProductCategory): ?>
          <tr>
            <td headers="number"><?php echo $boothProductCategory['id']; ?></td>
            <td headers="name"><?php echo $boothProductCategory['name']; ?></td>
            <td headers="parent"><?php echo $boothProductCategory['parent_id']; ?></td>
            <td headers="edit">
              <a class="btn btn-primary" href="<?php echo base_url("booth_product_categories/edit/{$boothId}/{$boothProductCategory['id']}"); ?>">Sửa</a>
              <a class="btn btn-primary" href="<?php echo base_url("booth_product_categories/remove/{$boothId}/{$boothProductCategory['id']}"); ?>">Xóa</a>  
            </td>
          </tr>
        <?php endforeach; ?>
        </tbody>
      </table>  
    <?php else: ?>
      <div>Chưa có danh mục nào cho sản phẩm của gian hàng!</div>  
    <?php endif; ?>	
  </div> <!-- /middle-office-wrapper -->
  
  <hr class="line" />
</div> <!-- /middle-office-container -->